<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.thymeleaf.org">
<head>
<title>Student Management</title>
</head>
<body>
<h1>User Management</h1>
<form action="user.do" method="post" th:object="${user}">

	<table>
		<!-- <tr>
			<td>User ID</td>
			<td><input type="text" th:field="*{user.id}" /></td>
		</tr> -->
		<tr>
			<td>User Id</td>
			<td><input type="text" th:field="*{id}" /></td>
		</tr>
		<tr>
			<td>User name</td>
			<td><input type="text" th:field="*{username}" /></td>
		</tr>
		<tr>
			<td>First Name</td>
			<td><input type="text" th:field="*{firstname}" /></td>
		</tr>
		<tr>
			<td>Last Name</td>
			<td><input type="text" th:field="*{lastname}" /></td>
		</tr>
		<tr>
			<td>Password</td>
			<td><input type="text" th:field="*{password}" /></td>
		</tr>
		<tr>
			<td>Role</td>
			<td><input type="text" th:field="*{role}" /></td>
		</tr>
		<tr>
			<td>Document Creator</td>
			<td><input type="text" th:field="*{cancreate}" /></td>
		</tr>
		<tr>
			<td colspan="2">
				<input type="submit" name="action" value="Add" />
				<input type="submit" name="action" value="Edit" />
				<input type="submit" name="action" value="Delete" />
				<input type="submit" name="action" value="Search" />
			</td>
		</tr>
	</table>
</form>
<br/>
<table border="1">
	<th>ID</th>
	<th>User Name</th>
	<th>First name</th>
	<th>Last name</th>
	<th>Role</th>
	<th>Can Create</th>
		<tr th:each="user : ${userList}">
			<td th:text="${user.id}">Id</td>
			<td th:text="${user.username}">username</td>
			<td th:text="${user.firstname}">firstname</td>
			<td th:text="${user.lastname}">lastname</td>
			<td th:text="${user.role}">role</td>
			<td th:text="${user.cancreate}">cancreate</td>
		</tr>
</table>
</body>
</html>